import {useState} from 'react';
import {createGlobalStore} from 'hox'

export const [useHomeStore, getHomeStore] = createGlobalStore<any>(() => {
    const [count, setCount] = useState(0);
    const decrement = () => setCount(count - 1);
    const increment = () => setCount(count + 1);
    return {
        count,
        decrement,
        increment
    };
})

